<html>
	<head>
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="service.js"></script>
		<script type="text/javascript">
			function testGo(){
				var s = new TESTNS.JsServiceController();
				s.go(function(dat){
					alert(dat);
				}, function(xhr, t, e){
					alert('error:' + t +'/'+ e);
				}, 'TO!');
			}

			function testGoWithDummy(){
				var s = new TESTNS.JsServiceController();
				s.goWithDummy(function(dat){
					alert(dat);
				}, function(xhr, t, e){
					alert('error:' + t +'/'+ e);
				}, 'TO!');
			}

			function postGo(){
				var s = new TESTNS.JsServiceController();
				s.postGo(function(dat){
					alert(dat);
				}, function(xhr, t, e){
					alert('error:' + t +'/'+ e);
				}, 'POSTTO!');
			}
			
			function handleJson(){
				var s = new TESTNS.JsonController();
				s.handle(function(dat){
					alert(dat.msg);
				}, function(xhr, t, e){
					alert('error:' + t +'/'+ e);
				}, 'HANDLEJSON');
			}

			function restfulPut(){
				var s = new TESTNS.RestfulController();
				s.put(function(dat){
					alert(dat);
				}, function(xhr, t, e){
					alert('error:' + t +'/'+ e);
				}, 'RESTFUL_PUT', 'ABCDE');
			}
		</script>
	</head>
	<body>
		<button onclick="testGo()">testGo</button>	
		<button onclick="testGoWithDummy()">testGoWithDummy</button>	
		<button onclick="postGo()">postGo</button>	
		<button onclick="handleJson()">handleJson</button>	
		<button onclick="restfulPut()">restfulPut</button>	
	</body>
</html>